package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WarehouseCategoryMapper;
import com.ruoyi.system.domain.WarehouseCategory;
import com.ruoyi.system.service.IWarehouseCategoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 入库品类 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-07
 */
@Service
public class WarehouseCategoryServiceImpl implements IWarehouseCategoryService 
{
	@Autowired
	private WarehouseCategoryMapper warehouseCategoryMapper;

	/**
     * 查询入库品类信息
     * 
     * @param id 入库品类ID
     * @return 入库品类信息
     */
    @Override
	public WarehouseCategory selectWarehouseCategoryById(Long id)
	{
	    return warehouseCategoryMapper.selectWarehouseCategoryById(id);
	}
	
	/**
     * 查询入库品类列表
     * 
     * @param warehouseCategory 入库品类信息
     * @return 入库品类集合
     */
	@Override
	public List<WarehouseCategory> selectWarehouseCategoryList(WarehouseCategory warehouseCategory)
	{
	    return warehouseCategoryMapper.selectWarehouseCategoryList(warehouseCategory);
	}
	
    /**
     * 新增入库品类
     * 
     * @param warehouseCategory 入库品类信息
     * @return 结果
     */
	@Override
	public int insertWarehouseCategory(WarehouseCategory warehouseCategory)
	{
	    return warehouseCategoryMapper.insertWarehouseCategory(warehouseCategory);
	}
	
	/**
     * 修改入库品类
     * 
     * @param warehouseCategory 入库品类信息
     * @return 结果
     */
	@Override
	public int updateWarehouseCategory(WarehouseCategory warehouseCategory)
	{
	    return warehouseCategoryMapper.updateWarehouseCategory(warehouseCategory);
	}

	/**
     * 删除入库品类对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWarehouseCategoryByIds(String ids)
	{
		return warehouseCategoryMapper.deleteWarehouseCategoryByIds(Convert.toStrArray(ids));
	}
	
}
